{__NOLAYOUT__}
<layout name="no_nav" />

<!-- TOPBAR -->
<header class="top-bar flex-row">
  <a class="row-item row-item-auto top-bar-back" href="javascript:window.history.back()">返回</a>
  <h3 class="row-item top-bar-name">{$category.name}</h3>
  <span class="row-item row-item-auto top-bar-menu"></span>
</header>

<!-- 商城栏目 -->
<section class="pr-block">

  <div class="pr-block-content clearfix">

    <tag:productCategory id="vo" pid="$category['id']">

      <if condition="$index%2 eq 1"><p class="flex-row"></if>

      <a class="pr-category-item row-item" href="{$vo.url}">{$vo.name}</a>

      <if condition="$index%2 neq 0 and $index==$listSize">
        <for start="0" end="2-$index%2"><a class="pr-category-item row-item" href="javascript:void(0)"></a></for>
      </if>

      <if condition="$index%2 eq 0 or $index==$listSize"></p></if>

    </tag:productCategory>
    
  </div>

</section>

<!-- 热销产品 -->
<section class="pr-block">
  
  <header class="pr-block-title">
    <h4><a class="pr-block-title-a" href="__CONTROLLER__/productRank/type/1/sid/{$sid}">热销排行</a></h4>
  </header>

  <div class="pr-block-content clearfix">

    <tag:productGoods id="vo" order="saled_base desc,saled_count desc" child="1" limit="4">

    <a class="pr-item" href="{$vo.url}">

      <figure class="pr-item-image">
        <img class="w100" src="{$vo.thumb_img}">
      </figure>

      <section class="pr-item-info">
        <p class="pr-item-name">{$vo.name}</p>
        <p class="pr-item-price">
          <b class="pr-item-nowprice">￥{$vo.price}</b>
          <notempty name="vo.price_high"><del class="pr-item-originprice">{$vo.price_high}</del></notempty>
        </p>
        <p class="pr-item-saled-count">销量：{$vo['saled_count']+$vo['saled_base']}</p>  
      </section>

    </a>

    </tag:productGoods>
    
  </div>

</section>